/**
 * @author 李逢喜
 * create 2021/7/14
 */
public class DatastrutsMain1 {

    public static void main(String[] args) {
       long start=System.currentTimeMillis();
        sum(1000);
        long end=System.currentTimeMillis();
        long min=(end-start);
        System.out.println("min:"+min);
    }


    static int sum(int n) {
        int s = 0;
        int i = 1;
        int j = 1;
        for (; i <= n; i++) {//n

            j = 1;
            for (; j <= n; j++) {//n*n
                s = s + i + j; // n*n

            }
        }
        return s;
    }
}
